export default class SourceModel {
    path=''
    ext="png"
    baseUrl="./assets/game1/animation"
    start=0
    end=11
    digits=3
    width=0
    height=0
    originx=0
    originy=0
    fps=60
    static create(data:string|any):SourceModel{
        let json:any
        if(typeof data === 'string'){
            json=JSON.parse(data)
        }else{
            json=data
        }
        const model=new SourceModel()
        model.ext=json.ext
        model.baseUrl=json.baseUrl
        model.start=json.start
        model.end=json.end
        model.digits=json.digits
        return model
    }
}